package com.chb.entity;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @description:
 * @author: CHB
 * @create: 2021-12-01 14:03
 **/
//@Data
@NoArgsConstructor
@AllArgsConstructor
public class Employee implements Cloneable{
    private String name;
    private Date birth;
    private double salary;

    public Employee clone() throws CloneNotSupportedException {
        Employee clone = (Employee) super.clone();
        clone.birth = (Date)birth.clone();
        return clone;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
}
